<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <button @click="age++">加一</button>{{age}}
        <button @click="age--">减一</button>
        <div v-if="age>=65">进公园免门票</div>
        <div v-else-if="age>=50&&age<65">进公园半价</div>
        <div v-else-if="age>=18&&age<50">买全票</div>
        <div v-else>小孩也免票</div>

        <div v-if="flag">1</div>
        <div v-if="flag">2</div>
        <div v-if="flag">3</div>

        <template v-if="flag">
            <div>1</div>
            <div>2</div>
            <div>3</div>
        </template>
    </div>
</body>
<script src="./lib/vue.global.js"></script>
<script>
  const {createApp} = Vue;
  const app = createApp({
    data(){
      return {
        age:60,
        flag:true
      }
    }
  })
  app.mount('#app')
</script>
</html>